package com.my.chapter3;

public class practice10 {
    public static void main(String[] args) {
        int i = 0x1;
        int j = 0x2;
        System.out.println("i= "+Integer.toBinaryString(i)+"; j= "+Integer.toBinaryString(j));
        int k = i&j;
        System.out.println("i&j= "+Integer.toBinaryString(k));
        int o = i|j;
        System.out.println("i|j= "+Integer.toBinaryString(o));
        int m = i^j;
        System.out.println("i^j= "+Integer.toBinaryString(m));
        int n = ~i;
        int t = ~j;
        System.out.println("~i= "+Integer.toBinaryString(n)+"; ~j= "+Integer.toBinaryString(t));
    }
}
